<%--
  Created by IntelliJ IDEA.
  User: WYX
  Date: 2024/6/7
  Time: 下午9:09
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>贪吃蛇</title>
    <link rel="stylesheet" href="../../css/all.css">
    <jsp:useBean id="user" class="gamer.Bean.User" scope="session"/>
</head>
<body class="container">
<div>
    <div class="header">
        <img class="logo-img" src="../../img/logo.png" alt="logo">
        <div class="menu-div">
            <ul>
                <li><a href="../../index.jsp">首页</a></li>
                <li style="background-color: #BBB"><a href="gameMenu.jsp">游戏菜单</a></li>
                <%
                    if (user.getUser() == null)
                        out.print("<li><a href=\"../user/login.jsp\">登录</a></li>");
                    else
                        out.print("<li><a href=\"../user/userInfo.jsp\">用户中心</a></li>");
                %>
            </ul>
        </div>
    </div>
    <div class="main-div">
        <h3>贪吃蛇当前得分：<span id="scoreDisplay">0</span></h3>
        <canvas id="snakeCanvas" width="400" height="400"></canvas>
        <button id="startButton">开始</button>
    </div>
</div>
<script src="../../js/snake.js"></script>
</body>
</html>
